{#- vim: set et ts=8 sts=4 sw=4 ai: -#}
{% extends "layout.html" %}
{% block js %}
{{ super() }}
<script src="{{ url_for("static", filename="js/otterwiki.js") | debug_unixtime }}" type="text/javascript" charset="utf-8"></script>
{% endblock js %}
{% block menu %}
{% if "home" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                <a href="{{ url_for("index") }}" class="sidebar-link sidebar-link-with-icon">
                    <span class="sidebar-icon">
                        <i class="fas fa-home"></i>
                    </span>
                    Home
                </a>
{% endif %}
{% if has_permission('READ') and "pageindex" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                <a href="{{ url_for("pageindex") }}" class="sidebar-link sidebar-link-with-icon">
                    <span class="sidebar-icon">
                        <i class="fas fa-list"></i>
                    </span>
                    A - Z
                </a>
{% endif %}
{% if has_permission('READ') and "changelog" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                <a href="{{ url_for("changelog") }}" class="sidebar-link sidebar-link-with-icon">
                    <span class="sidebar-icon">
                        <i class="fas fa-history"></i>
                    </span>
                    Changelog
                </a>
{% endif %}
{% if has_permission('WRITE') and "createpage" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                <a href="{{ url_for("create") }}" id="create-page-btn" class="sidebar-link sidebar-link-with-icon">
                    <span class="sidebar-icon">
                        <i class="far fa-file"></i>
                    </span>
                    Create page
                </a>
{% endif %}
{%- if config.SIDEBAR_SHORTCUTS.split()|length > 0 %}
<br />
{%- endif %}
                <div id="sidebar-toc" class="sidebar-toc d-xl-none">
                {% include 'snippets/toc.html' %}
                </div>
{% endblock %}

{% block navbardropdown %}
{% if has_permission('WRITE') and not "createpage" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                    <a href="{{ url_for("create") }}" class="dropdown-item-with-icon" id="create-page-btn">
                        <span class="dropdown-icon">
                            <i class="far fa-file"></i>
                        </span>
                    Create page
                    </a>
{% endif %}
{% if has_permission('READ') and not "pageindex" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                    <a href="{{ url_for("pageindex") }}" class="dropdown-item-with-icon">
                        <span class="dropdown-icon">
                            <i class="fas fa-list"></i>
                        </span>
                    A - Z
                    </a>
{% endif %}
{% if has_permission('READ') and not "changelog" in config.SIDEBAR_SHORTCUTS.lower().split() %}
                    <a href="{{ url_for("changelog") }}" class="dropdown-item-with-icon">
                        <span class="dropdown-icon">
                            <i class="fas fa-history"></i>
                        </span>
                    Changelog
                    </a>
{% endif %}
                    <a href="{{ url_for("help") }}" class="dropdown-item-with-icon">
                        <span class="dropdown-icon">
                            <i class="fas fa-question-circle"></i>
                        </span>
                    Documentation
                    </a>
{{ super() }}
{% endblock %}
{##}
{% block breadcrumbs %}
{%- include 'snippets/breadcrumbs.html' -%}
{% endblock %}
{##}
{% block extra_nav -%}
<div id="extranav-toc">
    {%- include 'snippets/toc.html' -%}
</div>
{%- endblock %}
